# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models


class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding model 'TinyShop'
        db.create_table(u'store_tinyshop', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('account', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=10, decimal_places=2)),
            ('sales', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('logo', self.gf('django.db.models.fields.files.ImageField')(default='/default/store/tinyshop_no_img.jpg', max_length=100)),
            ('balance', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=10, decimal_places=2)),
            ('mobile_no', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
        ))
        db.send_create_signal(u'store', ['TinyShop'])

        # Adding model 'ProductImage'
        db.create_table(u'store_productimage', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('tinyshop', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['store.TinyShop'])),
            ('image', self.gf('django.db.models.fields.files.ImageField')(default='/default/store/product_no_img.jpg', max_length=100)),
        ))
        db.send_create_signal(u'store', ['ProductImage'])

        # Adding model 'Product'
        db.create_table(u'store_product', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('tinyshop', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['store.TinyShop'])),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('image', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['store.ProductImage'])),
            ('price', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=2)),
            ('information', self.gf('django.db.models.fields.TextField')()),
            ('status', self.gf('django.db.models.fields.SmallIntegerField')(default=1)),
        ))
        db.send_create_signal(u'store', ['Product'])

        # Adding model 'Order'
        db.create_table(u'store_order', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('tinyshop', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['store.TinyShop'])),
            ('date', self.gf('django.db.models.fields.DateTimeField')()),
            ('amount', self.gf('django.db.models.fields.DecimalField')(max_digits=10, decimal_places=2)),
            ('payer', self.gf('django.db.models.fields.CharField')(max_length=20)),
            ('detail', self.gf('django.db.models.fields.TextField')()),
            ('payment', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('status', self.gf('django.db.models.fields.SmallIntegerField')(default=2)),
        ))
        db.send_create_signal(u'store', ['Order'])

        # Adding model 'GoodsCategory'
        db.create_table(u'store_goodscategory', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'store', ['GoodsCategory'])

        # Adding model 'GoodsLib'
        db.create_table(u'store_goodslib', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('category', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['store.GoodsCategory'])),
            ('price', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=10, decimal_places=2)),
            ('image', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('information', self.gf('django.db.models.fields.TextField')()),
        ))
        db.send_create_signal(u'store', ['GoodsLib'])


    def backwards(self, orm):
        # Deleting model 'TinyShop'
        db.delete_table(u'store_tinyshop')

        # Deleting model 'ProductImage'
        db.delete_table(u'store_productimage')

        # Deleting model 'Product'
        db.delete_table(u'store_product')

        # Deleting model 'Order'
        db.delete_table(u'store_order')

        # Deleting model 'GoodsCategory'
        db.delete_table(u'store_goodscategory')

        # Deleting model 'GoodsLib'
        db.delete_table(u'store_goodslib')


    models = {
        u'store.goodscategory': {
            'Meta': {'object_name': 'GoodsCategory'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'store.goodslib': {
            'Meta': {'object_name': 'GoodsLib'},
            'category': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['store.GoodsCategory']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'information': ('django.db.models.fields.TextField', [], {}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'price': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '10', 'decimal_places': '2'})
        },
        u'store.order': {
            'Meta': {'object_name': 'Order'},
            'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}),
            'date': ('django.db.models.fields.DateTimeField', [], {}),
            'detail': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'payer': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
            'payment': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}),
            'tinyshop': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['store.TinyShop']"})
        },
        u'store.product': {
            'Meta': {'object_name': 'Product'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['store.ProductImage']"}),
            'information': ('django.db.models.fields.TextField', [], {}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}),
            'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}),
            'tinyshop': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['store.TinyShop']"})
        },
        u'store.productimage': {
            'Meta': {'object_name': 'ProductImage'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('django.db.models.fields.files.ImageField', [], {'default': "'/default/store/product_no_img.jpg'", 'max_length': '100'}),
            'tinyshop': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['store.TinyShop']"})
        },
        u'store.tinyshop': {
            'Meta': {'object_name': 'TinyShop'},
            'account': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '10', 'decimal_places': '2'}),
            'balance': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '10', 'decimal_places': '2'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'logo': ('django.db.models.fields.files.ImageField', [], {'default': "'/default/store/tinyshop_no_img.jpg'", 'max_length': '100'}),
            'mobile_no': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'sales': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        }
    }

    complete_apps = ['store']